package com.banach.prema.service;

import com.alibaba.fastjson.JSONObject;
import com.banach.prema.dto.vo.ImTokenVO;
import com.banach.prema.executor.ImCallbackExe;
import com.banach.prema.executor.ImTokenGenExe;
import com.ego.framework.dto.Response;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Service;

import java.io.IOException;

/**
 * @Author ajun
 * @Desc
 * @Date 2025/7/16 16:56
 */
@Service
public class ImService {
    @Resource
    private ImCallbackExe imCallbackExe;
    @Resource
    private ImTokenGenExe imTokenExe;
    public JSONObject callback(HttpServletRequest request) throws IOException {
        return imCallbackExe.callback(request);
    }

    public Response<ImTokenVO> genImToken(){
        return imTokenExe.genImToken();
    }
}
